<template>
  <div class="waiting-info">
    <div class="list-item-setting" v-if="true">
      <div class="title-info">
        <el-divider content-position="left">列表区域设置</el-divider>
      </div>
      <el-form-item label="内容高度">
        <el-input-number
            v-model="optionsInfo['areaHeight']"
            :min="640"
            size="small"
            class="hide-spin-button"
        />
      </el-form-item>
      <el-form-item label="名字类型" class="column-area">
        <el-radio-group v-model="optionsInfo['topNameType']">
          <el-radio v-for="item in NameOptionInfo" :label="item.value" :key="item.value" :disabled="item.disabled">{{item.label}}</el-radio>
        </el-radio-group>
      </el-form-item>
      <!--诊室选中字段-->
      <template v-if="optionsInfo['topNameType']==='roomName'">
        <roomNameKeyEditor
            :designer="designer"
            :selected-widget="selectedWidget"
            :option-model="optionModel"
        />
      </template>
    </div>
  </div>
</template>

<script>
import roomNameKeyEditor
  from "@sc/templateDetails/modules/homeRight/property-editor/module/scene-edit/basicInfo/roomNameKey-editor.vue";

export default {
  name: "sceneDRCCurrentWaiting-editor",

  componentName: "sceneDRCCurrentWaiting-editor",

  components: {roomNameKeyEditor},

  mixins: [],

  props: {
    designer: Object,
    selectedWidget: Object,
    optionModel: Object,
  },

  inject: ['serverFieldList', 'getDesignerConfig'],

  data() {
    return {
      optionsInfo: Object(),
      NameOptionInfo:[
        {
          value:'deptName',
          label:'科室'
        },
        {
          value:'roomName',
          label:'诊室'
        },
        {
          value: 'registerObjName',
          label:'号别',
          disabled: true,
        },
      ]
    }
  },

  computed: {},

  methods: {},

  watch: {
    // 组件的所有信息
    optionModel: {
      handler: function (val) {
        this.optionsInfo = val[val.config];
      },
      deep: true,
      immediate: true
    }
  }
}
</script>

<style lang="scss" scoped>
.column-area{
  display: flex;
  flex-direction: column;
  :deep(.el-form-item__label){
    width: 100% !important;
    margin-bottom: 10px;
  }
  :deep(.el-form-item__content){
    width: 100%;
    margin-left: 0 !important;
    .el-radio-group{
      width: 100%;
      display: flex;
      flex-direction: column;
      .el-radio{
        margin-bottom: 10px;
      }
    }
  }

}
</style>